﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="library_managerment.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <style>
        #main {
            background-image:url('../images/l1.png');
            filter:blur(6);
            background-repeat: no-repeat;
            background-size: cover;
            width:100vw;
            height:100vh;
            position: absolute; 
            top: 0;             
            left: 0;   
        }
        #content {
            display:flex;
           width:70vw;
           height:55vh;
           margin:auto;
           margin-top:150px;
        }
        #left {
            width:60%;
        }
        #right {
            width:40%;
            background-color: rgb(255,255,255,0.9);
            border-top-right-radius: 30px;
            border-bottom-right-radius: 30px;
        }
        #left_img {
            width:100%;
            height:100%;
            border-top-left-radius: 30px;
            border-bottom-left-radius: 30px;
            transition: opacity 1s ease-in-out;
        }
        table {
            margin:80px auto;
        }
        table tr td{
            text-align:center;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="main">
            <div id="content">
                <div id="left">
                    <img src="../images/l1.png" id="left_img"></img>
                </div>
                <div id="right">
                    <table width="90%" height="60%">
                        <th colspan="2" style="font-size:25px">图书管理系统登录</th>
                        <tr>
                            <td><asp:Label ID="Label3" runat="server" Text="用户名"></asp:Label></td>
                            <td><asp:TextBox runat="server" ID="username"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td><asp:Label runat="server" Text="密码" ID="Label4"></asp:Label></td>
                            <td><asp:TextBox runat="server" ID="userpwd"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button runat="server" Text="登录" ID="Button1" OnClick="Button1_Click" Width="150px" BackColor="#66CCFF" Height="25px" BorderStyle="None"></asp:Button>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Button runat="server" Text="立即注册" ID="Register" OnClick="Register_Click" Width="150px"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </form>
</body>
<script>
    var index = 1;
    function lunbo() {
        index++;
        if (index > 3) {
            index = 1;
        }
        var main = document.getElementById('main');
        var left = document.getElementById('left_img');
        main.style.backgroundImage = "url(../images/l" + index + ".png)";
        left.setAttribute('src', '../images/l' + index + '.png');
    }
    setInterval(lunbo, 2000);
</script>
</html>
